
package servidor.localizacao;

import java.util.Date;
import java.util.Properties;

import com.ekahau.sdk.Device;
import com.ekahau.sdk.Location;
import com.ekahau.sdk.TrackedDevice;

/**
 * @author Diego
 */
public class Dispositivo extends TrackedDevice {

    private Location location;
    private Date dataUltimaRequisicao;
    
    /**
     * @param arg0
     */
    public Dispositivo(Device arg0) {
        super(arg0);
    }
    
    /**
     * @return Returns the location.
     */
    public Location getLocation() {
        return location;
    }
    /**
     * @param location The location to set.
     */
    public void setLocation(Location location) {
        this.location = location;
        
    }
    
    /**
     * @return Returns the ultimaRequisicao.
     */
    public Date getDataUltimaRequisicao() {
        return dataUltimaRequisicao;
    }
    /**
     * @param ultimaRequisicao The ultimaRequisicao to set.
     */
    public void setDataUltimaRequisicao(Date data) {
        this.dataUltimaRequisicao = data;
    }
    
    public double getX() {
        return location.getX();
    }
    public double getY() {
        return location.getY();
    }
    public byte[] getMap() {
        return location.getLocationContext().getMap();   
    }
    public String getMapName() {
    	Properties properties = location.getLocationContext().getProperties();
    	return properties.getProperty("Name");
    }
    public int getAndar() {
    	Properties properties = location.getLocationContext().getProperties();
    	return Integer.parseInt(properties.getProperty("Andar"));
    }
    
}
